package com.ruoyi.shopping.mapper;

import java.util.List;

import com.ruoyi.shopping.domain.MallCoupons;
import com.ruoyi.shopping.domain.MallCouponsMember;
import org.apache.ibatis.annotations.Param;

/**
 * 优惠券领取Mapper接口
 *
 * @author ruoyi
 * @date 2022-06-09
 */
public interface MallCouponsMemberMapper
{
    /**
     * 查询优惠券领取
     *
     * @param id 优惠券领取主键
     * @return 优惠券领取
     */
    public MallCouponsMember selectMallCouponsMemberById(Long id);

    /**
     * 查询优惠券领取列表
     *
     * @param mallCouponsMember 优惠券领取
     * @return 优惠券领取集合
     */
    public List<MallCouponsMember> selectMallCouponsMemberList(MallCouponsMember mallCouponsMember);

    /**
     * 新增优惠券领取
     *
     * @param mallCouponsMember 优惠券领取
     * @return 结果
     */
    public int insertMallCouponsMember(MallCouponsMember mallCouponsMember);

    /**
     * 修改优惠券领取
     *
     * @param mallCouponsMember 优惠券领取
     * @return 结果
     */
    public int updateMallCouponsMember(MallCouponsMember mallCouponsMember);

    /**
     * 删除优惠券领取
     *
     * @param id 优惠券领取主键
     * @return 结果
     */
    public int deleteMallCouponsMemberById(Long id);

    /**
     * 批量删除优惠券领取
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallCouponsMemberByIds(Long[] ids);

    /**
     * 批量逻辑删除优惠券领取
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int logicDeleteMallCouponsMember(@Param("array") Long[] ids, @Param("delType") String delType, @Param("delUser") Long delUser);

    List<MallCouponsMember> selectCanUseList(MallCouponsMember cm);

    List<MallCouponsMember> selectMineCoupons(MallCouponsMember mallCouponsMember);

    List<MallCouponsMember> selectByCouponId(@Param("list") List<Long> collect, @Param("memberId") Long loginMemberId);

    //商城优惠卷超时
    List<MallCouponsMember> selectMallCouponsTimeout();
}
